Integrand size = 24, antiderivative size = 90 \[ \int \frac {\tan ^4(c+d x)}{a+i a \tan (c+d x)} \, dx=-\frac {3 x}{2 a}-\frac {2 i \log (\cos (c+d x))}{a d}+\frac {3 \tan (c+d x)}{2 a d}-\frac {i \tan ^2(c+d x)}{a d}-\frac {\tan ^3(c+d x)}{2 d (a+i a \tan (c+d x))} \]
-3/2*x/a-2*I*ln(cos(d*x+c))/a/d+3/2*tan(d*x+c)/a/d-I*tan(d*x+c)^2/a/d-1/2* tan(d*x+c)^3/d/(a+I*a*tan(d*x+c))
Time = 0.39 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.02 \[ \int \frac {\tan ^4(c+d x)}{a+i a \tan (c+d x)} \, dx=\frac {-4 \log (\cos (c+d x))-i (3+4 \log (\cos (c+d x))) \tan (c+d x)+\tan ^2(c+d x)-i \tan ^3(c+d x)-3 \arctan (\tan (c+d x)) (-i+\tan (c+d x))}{2 a d (-i+\tan (c+d x))} \]
(-4*Log[Cos[c + d*x]] - I*(3 + 4*Log[Cos[c + d*x]])*Tan[c + d*x] + Tan[c + d*x]^2 - I*Tan[c + d*x]^3 - 3*ArcTan[Tan[c + d*x]]*(-I + Tan[c + d*x]))/( 2*a*d*(-I + Tan[c + d*x]))
Time = 0.49 (sec) , antiderivative size = 86, normalized size of antiderivative = 0.96, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3042, 4033, 3042, 4011, 3042, 4008, 3042, 3956}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\tan ^4(c+d x)}{a+i a \tan (c+d x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\tan (c+d x)^4}{a+i a \tan (c+d x)}dx\) |
\(\Big \downarrow \) 4033 |
\(\displaystyle \frac {\int \tan ^2(c+d x) (3 a-4 i a \tan (c+d x))dx}{2 a^2}-\frac {\tan ^3(c+d x)}{2 d (a+i a \tan (c+d x))}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \tan (c+d x)^2 (3 a-4 i a \tan (c+d x))dx}{2 a^2}-\frac {\tan ^3(c+d x)}{2 d (a+i a \tan (c+d x))}\) |
\(\Big \downarrow \) 4011 |
\(\displaystyle \frac {\int \tan (c+d x) (3 \tan (c+d x) a+4 i a)dx-\frac {2 i a \tan ^2(c+d x)}{d}}{2 a^2}-\frac {\tan ^3(c+d x)}{2 d (a+i a \tan (c+d x))}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \tan (c+d x) (3 \tan (c+d x) a+4 i a)dx-\frac {2 i a \tan ^2(c+d x)}{d}}{2 a^2}-\frac {\tan ^3(c+d x)}{2 d (a+i a \tan (c+d x))}\) |
\(\Big \downarrow \) 4008 |
\(\displaystyle \frac {4 i a \int \tan (c+d x)dx-\frac {2 i a \tan ^2(c+d x)}{d}+\frac {3 a \tan (c+d x)}{d}-3 a x}{2 a^2}-\frac {\tan ^3(c+d x)}{2 d (a+i a \tan (c+d x))}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {4 i a \int \tan (c+d x)dx-\frac {2 i a \tan ^2(c+d x)}{d}+\frac {3 a \tan (c+d x)}{d}-3 a x}{2 a^2}-\frac {\tan ^3(c+d x)}{2 d (a+i a \tan (c+d x))}\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle \frac {-\frac {2 i a \tan ^2(c+d x)}{d}+\frac {3 a \tan (c+d x)}{d}-\frac {4 i a \log (\cos (c+d x))}{d}-3 a x}{2 a^2}-\frac {\tan ^3(c+d x)}{2 d (a+i a \tan (c+d x))}\) |
-1/2*Tan[c + d*x]^3/(d*(a + I*a*Tan[c + d*x])) + (-3*a*x - ((4*I)*a*Log[Co s[c + d*x]])/d + (3*a*Tan[c + d*x])/d - ((2*I)*a*Tan[c + d*x]^2)/d)/(2*a^2 )
3.1.47.3.1 Defintions of rubi rules used
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d *x], x]]/d, x] /; FreeQ[{c, d}, x]
Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.) *(x_)]), x_Symbol] :> Simp[(a*c - b*d)*x, x] + (Simp[b*d*(Tan[e + f*x]/f), x] + Simp[(b*c + a*d) Int[Tan[e + f*x], x], x]) /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[b*c + a*d, 0]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[d*((a + b*Tan[e + f*x])^m/(f*m)), x] + Int [(a + b*Tan[e + f*x])^(m - 1)*Simp[a*c - b*d + (b*c + a*d)*Tan[e + f*x], x] , x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && GtQ[m, 0]
Int[((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_)/((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*c - a*d)*((c + d*Tan[e + f*x])^(n - 1)/( 2*a*f*(a + b*Tan[e + f*x]))), x] + Simp[1/(2*a^2) Int[(c + d*Tan[e + f*x] )^(n - 2)*Simp[a*c^2 + a*d^2*(n - 1) - b*c*d*n - d*(a*c*(n - 2) + b*d*n)*Ta n[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && GtQ[n, 1]
Time = 0.35 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.87
method | result | size |
risch | \(-\frac {7 x}{2 a}+\frac {i {\mathrm e}^{-2 i \left (d x +c \right )}}{4 a d}-\frac {4 c}{a d}+\frac {2 i}{d a \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}-\frac {2 i \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{a d}\) | \(78\) |
derivativedivides | \(\frac {\tan \left (d x +c \right )}{a d}-\frac {i \left (\tan ^{2}\left (d x +c \right )\right )}{2 d a}+\frac {i \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{d a}-\frac {3 \arctan \left (\tan \left (d x +c \right )\right )}{2 d a}+\frac {1}{2 d a \left (\tan \left (d x +c \right )-i\right )}\) | \(86\) |
default | \(\frac {\tan \left (d x +c \right )}{a d}-\frac {i \left (\tan ^{2}\left (d x +c \right )\right )}{2 d a}+\frac {i \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{d a}-\frac {3 \arctan \left (\tan \left (d x +c \right )\right )}{2 d a}+\frac {1}{2 d a \left (\tan \left (d x +c \right )-i\right )}\) | \(86\) |
norman | \(\frac {\frac {i}{a d}+\frac {\tan ^{3}\left (d x +c \right )}{a d}-\frac {3 x}{2 a}-\frac {3 x \left (\tan ^{2}\left (d x +c \right )\right )}{2 a}+\frac {3 \tan \left (d x +c \right )}{2 a d}-\frac {i \left (\tan ^{4}\left (d x +c \right )\right )}{2 d a}}{1+\tan ^{2}\left (d x +c \right )}+\frac {i \ln \left (1+\tan ^{2}\left (d x +c \right )\right )}{d a}\) | \(111\) |
-7/2*x/a+1/4*I/a/d*exp(-2*I*(d*x+c))-4/a/d*c+2*I/d/a/(exp(2*I*(d*x+c))+1)^ 2-2*I/a/d*ln(exp(2*I*(d*x+c))+1)
Time = 0.24 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.53 \[ \int \frac {\tan ^4(c+d x)}{a+i a \tan (c+d x)} \, dx=-\frac {14 \, d x e^{\left (6 i \, d x + 6 i \, c\right )} + {\left (28 \, d x - i\right )} e^{\left (4 i \, d x + 4 i \, c\right )} + 2 \, {\left (7 \, d x - 5 i\right )} e^{\left (2 i \, d x + 2 i \, c\right )} + 8 \, {\left (i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 2 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + i \, e^{\left (2 i \, d x + 2 i \, c\right )}\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - i}{4 \, {\left (a d e^{\left (6 i \, d x + 6 i \, c\right )} + 2 \, a d e^{\left (4 i \, d x + 4 i \, c\right )} + a d e^{\left (2 i \, d x + 2 i \, c\right )}\right )}} \]
-1/4*(14*d*x*e^(6*I*d*x + 6*I*c) + (28*d*x - I)*e^(4*I*d*x + 4*I*c) + 2*(7 *d*x - 5*I)*e^(2*I*d*x + 2*I*c) + 8*(I*e^(6*I*d*x + 6*I*c) + 2*I*e^(4*I*d* x + 4*I*c) + I*e^(2*I*d*x + 2*I*c))*log(e^(2*I*d*x + 2*I*c) + 1) - I)/(a*d *e^(6*I*d*x + 6*I*c) + 2*a*d*e^(4*I*d*x + 4*I*c) + a*d*e^(2*I*d*x + 2*I*c) )
Time = 0.23 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.49 \[ \int \frac {\tan ^4(c+d x)}{a+i a \tan (c+d x)} \, dx=\begin {cases} \frac {i e^{- 2 i c} e^{- 2 i d x}}{4 a d} & \text {for}\: a d e^{2 i c} \neq 0 \\x \left (\frac {\left (1 - 7 e^{2 i c}\right ) e^{- 2 i c}}{2 a} + \frac {7}{2 a}\right ) & \text {otherwise} \end {cases} + \frac {2 i}{a d e^{4 i c} e^{4 i d x} + 2 a d e^{2 i c} e^{2 i d x} + a d} - \frac {7 x}{2 a} - \frac {2 i \log {\left (e^{2 i d x} + e^{- 2 i c} \right )}}{a d} \]
Piecewise((I*exp(-2*I*c)*exp(-2*I*d*x)/(4*a*d), Ne(a*d*exp(2*I*c), 0)), (x *((1 - 7*exp(2*I*c))*exp(-2*I*c)/(2*a) + 7/(2*a)), True)) + 2*I/(a*d*exp(4 *I*c)*exp(4*I*d*x) + 2*a*d*exp(2*I*c)*exp(2*I*d*x) + a*d) - 7*x/(2*a) - 2* I*log(exp(2*I*d*x) + exp(-2*I*c))/(a*d)
Exception generated. \[ \int \frac {\tan ^4(c+d x)}{a+i a \tan (c+d x)} \, dx=\text {Exception raised: RuntimeError} \]
Time = 0.96 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.94 \[ \int \frac {\tan ^4(c+d x)}{a+i a \tan (c+d x)} \, dx=-\frac {-\frac {i \, \log \left (\tan \left (d x + c\right ) + i\right )}{a} - \frac {7 i \, \log \left (\tan \left (d x + c\right ) - i\right )}{a} + \frac {2 \, {\left (i \, a \tan \left (d x + c\right )^{2} - 2 \, a \tan \left (d x + c\right )\right )}}{a^{2}} - \frac {-7 i \, \tan \left (d x + c\right ) - 5}{a {\left (\tan \left (d x + c\right ) - i\right )}}}{4 \, d} \]
-1/4*(-I*log(tan(d*x + c) + I)/a - 7*I*log(tan(d*x + c) - I)/a + 2*(I*a*ta n(d*x + c)^2 - 2*a*tan(d*x + c))/a^2 - (-7*I*tan(d*x + c) - 5)/(a*(tan(d*x + c) - I)))/d
Time = 4.77 (sec) , antiderivative size = 91, normalized size of antiderivative = 1.01 \[ \int \frac {\tan ^4(c+d x)}{a+i a \tan (c+d x)} \, dx=\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )-\mathrm {i}\right )\,7{}\mathrm {i}}{4\,a\,d}+\frac {\ln \left (\mathrm {tan}\left (c+d\,x\right )+1{}\mathrm {i}\right )\,1{}\mathrm {i}}{4\,a\,d}+\frac {\mathrm {tan}\left (c+d\,x\right )}{a\,d}+\frac {1{}\mathrm {i}}{2\,a\,d\,\left (1+\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}-\frac {{\mathrm {tan}\left (c+d\,x\right )}^2\,1{}\mathrm {i}}{2\,a\,d} \]